
// ---------------------------------------------------
// | File Name   : include.h
// | Author   	 : chagn7z
// | Create Date : 2014-6-16
// ---------------------------------------------------

#ifndef _INCLUDE_H_
#define _INCLUDE_H_

typedef struct _window
{
	u8   cur_menu;			//current menu
	u8   pos;				//position of cursor
	void (*onMenuFun)();
	void (*onUpFun)();
	void (*onDownFun)();
	void (*onEnterFun)();
}window;

typedef struct _btn_fun
{
	void (*onMenu)();
	void (*onUp)();
	void (*onDown)();
	void (*onEnter)();	
}btn_fun;

typedef struct _work_struct
{
	u8 ver;
	u8 modify;
	u8 time[3];				// 2->0 | h | min | sec |
	u8 timeset[3];			// 2->0 | h | min | sec |
	u8 relaya_on[2];		// 1->0 | h | min |
	u8 relaya_off[2];
	u8 relayb_day;
	u8 relay_num;
	u8 relayb_date[2];
	u8 relayb_mode[2];
}work_struct;

typedef struct  _temphumi_struct
{
	u16 temp;
	u16 humi;
}temphumi_struct;

/* GLOBAL VARIABLE */
extern u8 relay_status;
extern work_struct work_info;
extern window wnd_info;
extern temphumi_struct temphumi_info;

#endif
